Describes MIDI continuous controllers for each instrument and each zone within an instrument's part. If no def-controller is defined then no controller data is generated. Controller information is generated at the speed of note-length values. To send controller information more often, define a dummy instrument with lengths of say 1/32 or 1/64 and target it to go on the same MIDI channel as the actual instrument. Any number of controllers are allowed. Controller sets are defined with def-controller-set.
(def-controller gm-controllers
(piano
main-volume (list '(127)
(vector-round 50 100 (gen-sin 1 0.3 16)))
modulation-wheel '((4) (5 6))
)
(sax
main-volume '((4) (5 6))
modulation-wheel (list '(65 70 80 90)
(vector-round 50 100
(gen-sin 1 0.3 32 180)))
)
)
Each controller can have only 7-bit values, hence the need to round the vector values to the range from 0 to 127. If you need to access full 14-bit controllers you have to start from 14-bit values and then break the values into 7 upper bits and 7 lower bits and connect the resulting vectors to feed the coarce and fine controllers. Check your synthesizer manual for more details. In most cases the 7-bit controller values will be quite enough.
Controllers and compile-song
If you compile MIDI controllers with compile-song each column in a timesheet represents a zone lasting the duration of the timesheet resolution. To get more control over large sections of a composition use separate controller-only instruments. Then read both files to your sequencer. This example shows how to produce both files.
(def-symbol
sax '(a b c d)
sax-controller nil
)
(def-program gm-sound-set
sax alto-sax
)
(def-length
default '1/16
sax-controller '1/32
)
(def-channel
sax 1
sax-controller 1
)
(setq chords (activate-tonality (blues1 c 4) (blues1 d 4)))